{
    TFile *f = new TFile("amaevent_main_data_jtree.root");

    TTree *t = (TTree*)f->Get("Tree_JobInfo");

    TCanvas *c = new TCanvas("c","Job Statistics",0,0,1200,800);
    c->Divide(2,2);

    c->cd(1);
    gPad->SetGrid();
    gPad->SetLogx();

    TH1F *hJobEtime = new TH1F("hJobEtime", "job elapsed time", 1000, 0, 10**5);
    hJobEtime->SetFillColor(16);
    t->Draw("jobEtime>>hJobEtime","status == \"completed\"");
    hJobEtime->GetXaxis()->SetTitle("sec");

    c->cd(2);
    gPad->SetGrid();
    gPad->SetLogx();

    TH1F *hAppEtime = new TH1F("hAppEtime", "athena runtime", 2000, 0, 10**5);
    hAppEtime->SetFillColor(16);
    t->Draw("appEtime>>hAppEtime","status == \"completed\"");
    hAppEtime->GetXaxis()->SetTitle("sec");

    c->cd(3);
    gPad->SetGrid();
    TH2F *hAppTimeJobTime = new TH2F("hAppTimeJobTime", "job elapsed time vs. athena runtime", 100, 0, 8*10**4, 100, 0, 6*10**4);
    t->Draw("appEtime:jobEtime>>hAppTimeJobTime","status == \"completed\"","COL");
    hAppTimeJobTime->GetXaxis()->SetTitle("job etime (sec)");
    hAppTimeJobTime->GetYaxis()->SetTitle("athena runtime (sec)");

    TF1 *fun1 = new TF1("x=y","1.0 * x", 0, 6*10**4);
    fun1->SetLineWidth(1);
    fun1->SetLineColor(2);
    fun1->SetLineStyle(2);
    fun1->Draw("same");

    c->cd(4);
    gPad->SetGrid();

    TH2F *hAppTimeNevnts = new TH2F("hAppTimeNevnts", "event number vs. athena runtime", 100, 0, 4*10**5, 100, 0, 6*10**4);
    t->Draw("appEtime:no_events>>hAppTimeNevnts","status == \"completed\"","COL");
    hAppTimeNevnts->GetXaxis()->SetTitle("# events");
    hAppTimeNevnts->GetYaxis()->SetTitle("athena runtime (sec)");

    //c->cd(5);
    //gPad->SetLogx();
    //t->Draw("cloud:status","","text");

    //c->cd(6);
    //gPad->SetLogx();
    //t->Draw("status>>pie_status","","PIE");
    //TPie *pie_status = (TPie*) gDirectory->Get("pie_status");
}
